/*
    Wild Flamenco metronome 
    -
    By David Reguera Garcia - Dreg@fr33project.org -
    http://wildflamenco.blogspot.com/

    Copyright (C) <2011>  <David Reguera Garcia>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

*/


#ifndef _CONTAINER_H__
#define _CONTAINER_H__

#include <windows.h>
#include <string.h>

typedef struct CONTAINER_s
{
    void * data;
    unsigned int unit_size;
    unsigned int nr_elements;
    unsigned int ct;   
    BOOL allocated;

} CONTAINER_t;

unsigned int ContainerGetByteIndex( CONTAINER_t * );
unsigned int ContainerGetIndex( CONTAINER_t * );
void * ContainerGetElement( CONTAINER_t * );
unsigned int ContainerGetNrElement( CONTAINER_t * );
CONTAINER_t * ContainerInit( CONTAINER_t *, void *, unsigned int, unsigned int, BOOL );
unsigned int ContainerGetTotalSize( CONTAINER_t * );
BOOL ContainerAddElement( CONTAINER_t *, void * );
BOOL ContainerDelElement( CONTAINER_t *, void * );
void ContainerDelete( CONTAINER_t * );
void * ContainerNextElement( CONTAINER_t *, BOOL * );
void ContainerResetIndex( CONTAINER_t * );

#endif /* _CONTAINER_H__ */
